home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / kpartx.postinst < prev    next >
Text File  |  2009-03-10  |  2KB  |  61 lines

  1. #!/bin/sh
  2. # postinst script for kpartx
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <postinst> `abort-remove'
  14. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  15. #          <failed-install-package> <version> `removing'
  16. #          <conflicting-package> <version>
  17. # for details, see http://www.debian.org/doc/debian-policy/ or
  18. # the debian-policy package
  19.  
  20. RULE=/etc/udev/rules.d/kpartx.rules
  21.  
  22. case "$1" in
  23.     configure)
  24.     if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.4.7-4"; then
  25.         if [ -L $RULE ] && ! readlink -e $RULE; then
  26.             echo -n "Removing dangling $RULE symlink..."
  27.         rm $RULE
  28.         echo "done."
  29.         fi
  30.     fi
  31.     ;;
  32.  
  33.     abort-upgrade|abort-remove|abort-deconfigure)
  34.     ;;
  35.  
  36.     *)
  37.         echo "postinst called with unknown argument \`$1'" >&2
  38.         exit 1
  39.     ;;
  40. esac
  41.  
  42. # dh_installdeb will replace this with shell code automatically
  43. # generated by other debhelper scripts.
  44.  
  45. # Automatically added by dh_installudev
  46. if [ "$1" = configure ]; then
  47.     if [ -e "/etc/udev/kpartx.rules" ]; then
  48.         echo "Preserving user changes to /lib/udev/rules.d/95-kpartx.rules ..."
  49.         if [ -e "/lib/udev/rules.d/95-kpartx.rules" ]; then
  50.             mv -f "/lib/udev/rules.d/95-kpartx.rules" "/lib/udev/rules.d/95-kpartx.rules.dpkg-new"
  51.         fi
  52.         mv -f "/etc/udev/kpartx.rules" "/lib/udev/rules.d/95-kpartx.rules"
  53.     fi
  54. fi
  55. # End automatically added section
  56.  
  57.  
  58. exit 0
  59.  
  60.  
  61.